local TinyGameOver = {}

function TinyGameOver:init()
    self.btnAgain = nil;
    self.btnReturn = nil;
end

function TinyGameOver:onStart()
    self.btnAgain = self:find("btnAgain", CButton);
    self.btnReturn = self:find("btnReturn", CButton);
    Utils.addClick(self.btnReturn, function()
        self:hide(function()
            Dispatcher:dispatch(EventType.TinyGameLogin_Open);
        end);
    end);
    Utils.addClick(self.btnAgain, function()
        self:hide();
        Dispatcher:dispatch(EventType.TinyGame_Again);
    end);
end

function TinyGameOver:onShow()

end

function TinyGameOver:onHide()

end

return ClassUtils:extends(TinyGameOver, Dialog);